if [ "$(rpm -qa rsyslog)" ]; then
    echo "pass"
else
    echo "fail"
fi